import Vue from 'vue';
import App from './App.vue';
import router from './router';
import store from './store';
import Vant from 'vant';
import 'vant/lib/index.css';
import { Lazyload } from 'vant';
import Axios from "axios";
import { ScrollView, ScrollViewRefresh, ScrollViewMore } from 'mand-mobile'
import SocketIO from 'socket.io-client';
import VueSocketIO from 'vue-socket.io';

Vue.component(ScrollView.name, ScrollView)

Vue.use(new VueSocketIO({
  debug: true,
  connection: SocketIO('http://127.0.0.1:7001'),
  vuex: {
    store,
    actionPrefix: 'SOCKET_',
    mutationPrefix: 'SOCKET_'
  },
  options: { path: "/" } //Optional options
}))

Vue.use(Lazyload);
Vue.use(Vant);
Vue.config.productionTip = false;
Vue.prototype.$axios = Axios.create({
  baseURL: 'http://127.0.0.1:7001'
})

new Vue({
  router,
  store,
  render: (h) => h(App),
}).$mount('#app');
